package fr.umlv.ig.event;

import fr.umlv.ig.model.Station;

public class StationEvent {
	
	private final Station station;
	private final int eventType;

	public final static int STATION_OPENED=1;
	public final static int STATION_CLOSED=2;
	public final static int STATION_CREATE=3;
	public final static int STATION_ADDNEXT=3;

	public StationEvent(Station station, int eventType) {
		if(station == null) {
			throw new IllegalArgumentException("Cannot raise StationEvent for null Station");
		}
		
		if(eventType!=STATION_OPENED && eventType!=STATION_CLOSED && eventType != STATION_CREATE
				&&  eventType != STATION_ADDNEXT) {
			throw new IllegalArgumentException("Bad StationEvent type: "+eventType);
		}
		
		this.station = station;
		this.eventType = eventType;
	}


	public Station getStation() {
		return station;
	}

	
	public int getEventType() {
		return eventType;
	}
	
	
	
}
